
#g++ -o test test.cpp

# 可执行文件
TARGET = fast_test

INCLUDE=$(shell pkg-config opencv --cflags)  
LIBS=$(shell pkg-config --cflags opencv --libs)  
# C文件  
SRCS = fast_test.cpp
# 依赖目标
OBJS = $(SRCS:.c=.o)  

# 指令编译器和选项
CC=g++  -std=c++11
CFLAGS=-Wall -std=gnu++11
CXXFLAGS += -std=gnu++11

$(TARGET):$(OBJS)
 #@echo TARGET:$@
 #@echo OBJECTS:$^
	$(CC) -o  $@ $^ -I $(INCLUDE) $(LIBS)

clean:
	rm -rf $(TARGET) $(OBJS)


 %.o:%.c  
	$(CC) $(CFLAGS) -o $@ -c $< 